﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Yedda;

namespace Astrila.QckTwit
{
    public partial class TwitterLogin : Form
    {
        public TwitterLogin()
        {
            InitializeComponent();
        }

        public string UserName
        {
            get
            {
                return loginTextBox.Text;
            }
        }

        public string Password
        {
            get
            {
                return passwordTextbox.Text;
            }
        }

        private void testButton_Click(object sender, EventArgs e)
        {
            try
            {
                Twitter twitter = new Twitter();
                string returnValue = twitter.Show(this.UserName, this.Password, "0", Twitter.OutputFormatType.XML);
                MessageBox.Show("Yes, that's working");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void TwitterLogin_Load(object sender, EventArgs e)
        {
            loginTextBox.Text = Properties.Settings.Default.UserName;
            passwordTextbox.Text = Properties.Settings.Default.Password;
        }

    }
}
